package com.mocha.bss.domain.org.contoller.query;

import cn.hutool.core.util.StrUtil;
import com.coffee.mybatis.MybatisQuery;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author: songkui
 * @since: 2022/6/21 16:01
 */
@EqualsAndHashCode(callSuper = false)
@Data
public class UserQuery<UserInfoBO> extends MybatisQuery<UserInfoBO> {
    private String userName;
    private String loginCode;
    private String mobile;
    private Integer roleId;

    @Override
    public void buildOrderASC() {
        if (StrUtil.isNotEmpty(this.orderASC)){
            if ("loginCode".equals(this.orderASC)){
                this.orderASC = "u.login_code";
            }
        }
    }

    @Override
    public void buildOrderDESC() {
        if (StrUtil.isNotEmpty(this.orderASC)){
            if ("loginCode".equals(this.orderASC)){
                this.orderASC = "u.login_code";
            }
        }
    }




}

